package cn.xzc.job.cocurrent;

import java.util.concurrent.ThreadFactory;

/**
 * 自定义简单ThreadFactory-可以简单设置线程参数信息并创建线程
 *
 * @author xzc
 * 当前时间 2024-02-12 21:30:00
 */
@SuppressWarnings("serial")
public class CustomizableThreadFactory extends CustomizableThreadCreator implements ThreadFactory {

    /**
     * Create a new CustomizableThreadFactory with default thread name prefix.
     */
    public CustomizableThreadFactory() {
        super();
    }

    /**
     * Create a new CustomizableThreadFactory with the given thread name prefix.
     *
     * @param threadNamePrefix the prefix to use for the names of newly created threads
     */
    public CustomizableThreadFactory(String threadNamePrefix) {
        super(threadNamePrefix);
    }


    @Override
    public Thread newThread(Runnable runnable) {
        return createThread(runnable);
    }

}